package at.main.util;

import java.util.Vector;

public class StringToken {
	public static String[] split(String original,String separator) 
	{
	Vector nodes=new Vector();
	    int index = original.indexOf(separator);
	    while(index>=0) 
	    {
	        nodes.addElement( original.substring(0, index));
	        original = original.substring(index+separator.length());
	        index = original.indexOf(separator);
	    }
	    nodes.addElement( original );
	    String[] result = new String[ nodes.size() ];
	    if( nodes.size()>0 ) 
	    {
	        for(int loop=0; loop<nodes.size(); loop++)
	        {
	            result[loop] = (String)nodes.elementAt(loop);

	        }
	    }
	    return result;
	}
}
